package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author hecai
 * @date 2021/12/20 14:46
 */

/**
 * 购物项
 */
@ApiModel(value = "com-hc-domain-CartItem")
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_cart_item")
public class CartItem implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Integer id;

    /**
     * 商品编号
     */
    @TableField(value = "sku_id")
    @ApiModelProperty(value = "商品编号")
    private Integer skuId;

    /**
     * 个数
     */
    @TableField(value = "amount")
    @ApiModelProperty(value = "个数")
    private Integer amount;

    /**
     * 每一项的总金额
     */
    @TableField(value = "money")
    @ApiModelProperty(value = "每一项的总金额")
    private BigDecimal money;

    /**
     * 购物车编号
     */
    @TableField(value = "cart_id")
    @ApiModelProperty(value = "购物车编号")
    private Integer cartId;

    private static final long serialVersionUID = 1L;
}